using System.Collections;
using System.Collections.Generic;

namespace LS.Digitize
{
    public interface IDictionarySerializer: ICompoundSerializer
    {
        ISerializer KeySerializer { get; }
        ISerializer ValueSerializer { get; }
        
        bool ReadCollection(IReader reader, ICollection<KeyValuePair<object, object>> collection, ISerializer keySerializer, ISerializer valueSerializer, out bool nullCollection);
    }
    
    public interface IDictionarySerializer<T, TItem1, TItem2>: IDictionarySerializer, ICompoundSerializer<T> where T : IDictionary<TItem1, TItem2>
    {
        ISerializer KeySerializer { get; }
        ISerializer ValueSerializer { get; }

        bool ReadCollection(IReader reader, ICollection<KeyValuePair<TItem1, TItem2>> collection,
            ISerializer keySerializer, ISerializer valueSerializer, out bool nullCollection);
    }
}